//package org.example.utils.message;
//
//
//import com.tencentcloudapi.common.Credential;
//import com.tencentcloudapi.common.exception.TencentCloudSDKException;
//import com.tencentcloudapi.common.profile.ClientProfile;
//import com.tencentcloudapi.common.profile.HttpProfile;
//import com.tencentcloudapi.sms.v20190711.SmsClient;
//import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest;
//import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse;
//import org.example.skytool.commom.RamdomUtils;
//
///**
// * 发送短信工具类
// *
// * @author Wayne
// * @date 2019/6/26
// */
//public class MessageUtil {
//
//    private static String secretId = "AKIDPh2JMAj5BLL9jDVaUB2qQn6E8fy2rPim";
//
//    private static String secretKey = "we6IFyveBVbS8cgcKn0cM7hNJ7j6QfgS";
//
//    private static String appId = "1400815433";
//
//    private static String sign = "pink泡泡网";
//
//    private static String templateVeriId = "1783074";
//
//    private static String templateDefaultId = "1917569";
//
//    public static String sendVeriMessage(String to) throws TencentCloudSDKException {
//        String content = RamdomUtils.getRandom(6);
//        Credential cred = new Credential(secretId, secretKey);
//        HttpProfile httpProfile = new HttpProfile();
//        httpProfile.setReqMethod("POST");
//        httpProfile.setConnTimeout(60);
//        httpProfile.setEndpoint("sms.tencentcloudapi.com");
//        ClientProfile clientProfile = new ClientProfile();
//        clientProfile.setSignMethod("HmacSHA256");
//        clientProfile.setHttpProfile(httpProfile);
//        SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
//        SendSmsRequest req = new SendSmsRequest();
//        req.setSmsSdkAppid(appId);
//        req.setSign(sign);
//        req.setTemplateID(templateVeriId);
//        String[] phoneNumbers = {"86" + to};
//        req.setPhoneNumberSet(phoneNumbers);
//        String[] templateParams = {content};
//        req.setTemplateParamSet(templateParams);
//        SendSmsResponse res = client.SendSms(req);
//        return content;
//    }
//
//    public static void sendDefaultMessage(String to) throws TencentCloudSDKException {
//        Credential cred = new Credential(secretId, secretKey);
//        HttpProfile httpProfile = new HttpProfile();
//        httpProfile.setReqMethod("POST");
//        httpProfile.setConnTimeout(60);
//        httpProfile.setEndpoint("sms.tencentcloudapi.com");
//        ClientProfile clientProfile = new ClientProfile();
//        clientProfile.setSignMethod("HmacSHA256");
//        clientProfile.setHttpProfile(httpProfile);
//        SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
//        SendSmsRequest req = new SendSmsRequest();
//        req.setSmsSdkAppid(appId);
//        req.setSign(sign);
//        req.setTemplateID(templateDefaultId);
//        String[] phoneNumbers = {"86" + to};
//        req.setPhoneNumberSet(phoneNumbers);
//        SendSmsResponse res = client.SendSms(req);
//    }
//
//
//
//
//}